package com.manage.server.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.manage.server.mapper.AdminMapper;
import com.manage.server.pojo.Admin;
import com.manage.server.service.IAdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author zl
 * @since 2021-05-26
 */
@Service
public class AdminServiceImpl
        extends ServiceImpl<AdminMapper, Admin>
        implements IAdminService {
    @Autowired
    private AdminMapper adminMapper;
    /**
     * <p>
     *  查找用户实现
     * </p>
     *
     * @author zl
     * @since 2021-05-26
     */
    @Override
    public Admin findAdmin() {
        return adminMapper.selectById(1);
    }
    /**
     * <p>
     *  更新用户实现
     * </p>
     *
     * @author zl
     * @since 2021-05-26
     */
    @Override
    public boolean updateAdmin(Admin admin) {
        return adminMapper.updateById(admin) > 0;
    }

}
